package com.wangzz.mallchat.common.user.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wangzz.mallchat.common.user.domain.entity.User;
import com.wangzz.mallchat.common.user.mapper.UserMapper;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author <a href="https://gitee.com/wang-123zefeng/chat">wangzz</a>
 * @since 2024-11-11
 */
@Service
public class UserDao extends ServiceImpl<UserMapper, User> {

    public User queryUserByOpenId(String openId) {
        return getOne(new QueryWrapper<User>().lambda().eq(User::getOpenId, openId));
    }

}
